package com.ogilvy.audi.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ogilvy.audi.bean.Acmnt;
import com.ogilvy.audi.dao.AcmntDao;
import com.ogilvy.audi.service.AcmntService;
import com.ogilvy.frame.service.BaseServiceImpl;
@Service
public class AcmntServiceImpl extends BaseServiceImpl implements AcmntService {
	@Autowired
	AcmntDao acmntDao;

	public List<Acmnt> query() {
		return null;
	}

	public List<Acmnt> query(int pageNo, int pageSize,
			Map<String, Object> condition) {
		return acmntDao.selectAll(pageNo, pageSize, condition);
	}

	public List<Acmnt> query(Map<String, Object> condition) {
		return acmntDao.selectAll(condition);
	}

	public Acmnt add(Acmnt acmnt) {
		Acmnt acmnt_ = acmntDao.save(acmnt);
		return acmnt_;
	}

	public boolean del(Integer acmntId) {
		Acmnt acmnt = acmntDao.deleteById(acmntId);
		if (null != acmnt) {
			return true;
		}
		return false;
	}
}
